package com.seal.tsms.system.entity;

import java.io.Serializable;

/**
 * Created by seal.jing on 2016/1/2.
 */
public class RolePermissionPk implements Serializable {
    private SystemRole role;
    private SystemPermission permission;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        RolePermissionPk that = (RolePermissionPk) o;

        if (!role.equals(that.role)) return false;
        return permission.equals(that.permission);

    }

    @Override
    public int hashCode() {
        int result = role.hashCode();
        result = 31 * result + permission.hashCode();
        return result;
    }

    public SystemRole getRole() {
        return role;
    }

    public void setRole(SystemRole role) {
        this.role = role;
    }

    public SystemPermission getPermission() {
        return permission;
    }

    public void setPermission(SystemPermission permission) {
        this.permission = permission;
    }
}
